<div ng-include="sys_html('common/_header')"></div>
<style>
	.fui-page{background:#f2f2f2}
    .fui-cell-group{width:100%;border-radius: 0.5rem;}
    .fullback-title{color:#999999;font-size:0.7rem;padding:0.75rem 0 0.5rem 0;}
    .fullback-info{}
    .fullback-info p{height:1rem;line-height: 1rem;font-size:0.625rem;color:#333;display: inline-block;padding:0 0.5rem 0 0;}
    .fullback-info p i{border:none;height:0.75rem;width:0.75rem;display: inline-block;background: #ff4753;color:#fff;font-size:0.4rem;line-height: 0.8rem;text-align: center;
        font-style: normal;border-radius: 0.75rem;-webkit-border-radius: 0.75rem;margin-right:0.25rem;}
    .fullback-remark{line-height: 1rem;font-size:0.6rem;color:#666;padding:0.2rem 0;}
	.fui-tab:after {
		height: 0;
	}
	
</style>
<link rel="stylesheet" href="../core/resource/components/swiper/swiper.min.css">
<div ng-if="pagedata.account" class='fui-page fui-page-current  page-goods-detail' id='page-goods-detail-index'>
	<div ng-click="pagedata.showshareall=true" class="right-living" style="position: fixed;bottom:70%; border: 0 solid #ededed;padding-left:0.4rem;padding-right:0.2rem">
	   <span class="icon jinyunicon icon-fenxiang2" style="font-size:0.65rem;margin:0"></span> 分享
	</div>
	<!-- 顶部导航 下滑动显示 -->
    <div ng-if="!showtop" class="fui-header" style="position: fixed;">
        <div class="fui-header-left">
            <a class="back" href="javascript:" ng-click="goback()"></a>
        </div>
        <div class="title">
            <div id="tab" class="fui-tab fui-tab-danger">
                <a ng-class="{'tab':1, 'active':pagedata.showtype == 0 && pagedata.isgoodscontent != 1}" href="javascript:" ng-click="pagedata.goDetail('index')">商品</a>
                <a ng-class="{'tab':1, 'active':pagedata.showtype == 0 && pagedata.isgoodscontent == 1}" href="javascript:" ng-click="pagedata.goDetail('goodscontent')">详情</a>
                <a ng-class="{'tab':2, 'active':pagedata.showtype == 2}" href="javascript:" ng-click="pagedata.showtype = 2">参数</a>
                <a ng-class="{'tab':3, 'active':pagedata.showtype == 3}" href="javascript:" ng-click="pagedata.showtype = 3">评价</a>
            </div>
        </div>
        <div class="fui-header-right" ng-click="pagedata.showshareall=true">
			<i class="icon jinyunicon icon-icon-test"></i>
		</div>
    </div>
	<!-- 找不到宝贝 -->
    <div ng-if="!pagedata.goods"  class="fui-header ">
        <div class="fui-header-left">
            <a class="back" id="btn-back"></a>
        </div>
        <div class="title">
            找不到宝贝
        </div>
    </div>
	<!--参数已完成-->
    <div  ng-if="pagedata.showtype ==2"  ng-class="{'fui-content param-block in':1,'notbuy':!pagedata.goods.canbuy}" style="margin-top:0">
        <div class="fui-cell-group notop">
            <div ng-repeat="p in pagedata.goods.param" class="fui-cell">
                <div class="fui-cell-label md" >{{p.title}}</div>
                <div class="fui-cell-info md">{{p.value}}</div>
            </div>
        </div>
		<div class='content-empty' ng-if="pagedata.goods.param.length<1">
            <i class='icon icon-pingjia1'></i><br/>商品没有参数
        </div>
    </div>
<!--评价-->
    <div  ng-if="pagedata.showtype ==3"  ng-class="{'fui-content comment-block':1,'notbuy':!pagedata.goods.canbuy}" style="top:0;margin-top:1.8rem">
		<div class="fui-cell-group">
		<div class="fui-cell" ng-if="pagedata.commentsnum>0" style="margin-bottom:-0.3rem">
            <div class="fui-cell-text option-selector">评价({{pagedata.commentsnum}})</div>
            <div class="fui-cell-remark noremark">好评度<span style="color:red">{{pagedata.commentsfen.percent}}%</span></div>
        </div>
		<div class="fui-cell">
			<div class="fui-cell-info">
				<span ng-class="{'jylabels jylabel-red-bg':1,'active':pagedata.comments_type=='all'}" style="line-height:0.8rem;padding: 0.1rem 0.6rem;" ng-click="tool.get_list('jy_weishop/goods.detail/getcomments/goodsid='+pagedata.goods.id+'&type=all',true);pagedata.comments_type='all'">全部 {{pagedata.commentsnum}}+</span>
				<span ng-class="{'jylabels jylabel-red-bg':1,'active':pagedata.comments_type=='new'}" style="line-height:0.8rem;padding: 0.1rem 0.6rem;" ng-click="tool.get_list('jy_weishop/goods.detail/getcomments/goodsid='+pagedata.goods.id+'&type=new',true);pagedata.comments_type=''">最新的</span>
				<span ng-class="{'jylabels jylabel-red-bg':1,'active':pagedata.comments_type=='percent'}" style="line-height:0.8rem;padding: 0.1rem 0.6rem;" ng-click="tool.get_list('jy_weishop/goods.detail/getcomments/goodsid='+pagedata.goods.id+'&type=percent',true);pagedata.comments_type='percent'">非常不错 {{pagedata.commentsfen.count.good}}+</span>
				<span ng-class="{'jylabels jylabel-red-bg':1,'active':pagedata.comments_type=='normal_percent'}" style="line-height:0.8rem;padding: 0.1rem 0.6rem;" ng-click="tool.get_list('jy_weishop/goods.detail/getcomments/goodsid='+pagedata.goods.id+'&type=normal_percent',true);pagedata.comments_type='normal_percent'">感觉一般 {{pagedata.commentsfen.count.normal}}+</span>
				<span ng-class="{'jylabels jylabel-red-bg':1,'active':pagedata.comments_type=='bad_percent'}" style="line-height:0.8rem;padding: 0.1rem 0.6rem;" ng-click="tool.get_list('jy_weishop/goods.detail/getcomments/goodsid='+pagedata.goods.id+'&type=bad_percent',true);pagedata.comments_type='bad_percent'">差评 {{pagedata.commentsfen.count.bad}}+</span>
				<span ng-class="{'jylabels jylabel-red-bg':1,'active':pagedata.comments_type=='pic'}" style="line-height:0.8rem;padding: 0.1rem 0.6rem;" ng-click="tool.get_list('jy_weishop/goods.detail/getcomments/goodsid='+pagedata.goods.id+'&type=pic',true);pagedata.comments_type='pic'">有图的 {{pagedata.commentsfen.count.pic}}+</span>
			</div>
		</div>
        <div ng-if="pagedata.list.length>0" class="container">
		<!--评论展示区-->
			<div ng-include="sys_html('goods/comments')"></div>
		</div>
		</div>
		 <div class='content-empty' ng-if="pagedata.list.length<1">
            <i class='icon icon-pingjia1'></i><br/>暂时没有任何评价
        </div>
        <div ng-if="loading" class='infinite-loading'><span class='fui-preloader'></span><span class='text'> 正在加载...</span></div>
    </div>

<!-- 商品其他开始 -->
<div ng-if="pagedata.showtype==0" id="index" ng-class="{'fui-content basic-block pulldown':1, 'notbuy':pagedata.goods.canbuy}" style="top: 0.0rem;">

<div ng-if="!pagedata.goods" class='content-empty'>
    <i class='icon jinyunicon icon-search'></i><br/> 宝贝找不到了~ 您看看别的吧 ~<br/><a href="javascript:;" ng-click="access_json('jy_weishop/goods.index/')" class='btn btn-default-o external'>到处逛逛</a>
</div>
<i ng-if="pagedata.goods.qrcodeshare > 0" class="icon icon-qrcode" id="alert-click"></i>
<!--轮播图-->

<div id="carousel-container" class="carousel slide" data-role="carousel" data-param-auto="true">
	<div ng-if="!pagedata.goods.video || pagedata.isvideo!=1" class="carousel-inner" role="listbox" style="max-height:20rem">
		<div ng-class="{'item':1,'active':$index==0}" ng-repeat="item in pagedata.images">
			<a href="#">
				<img ng-src="{{tomedia(item) || '../core/resource/images/nopic.jpg'}}" style="display: block; width: 100%; height: 100%;">
			</a>
		</div>
	</div>
	<style>
            .fui-swipe-page .fui-swipe-bullet {background: {background}; opacity: {opacity};}
            .fui-swipe-page .fui-swipe-bullet.active {opacity: 1;}
    </style>
	<div ng-if="!pagedata.goods.video || pagedata.isvideo!=1" id="carousel-jinyun" class="fui-swipe-page" style="padding: 0 5px; bottom: 10px; ">
				<div class="fui-swipe-bullet" ng-repeat="item in pagedata.images" ng-class="{'active':$index==0}" data-target="#carousel-container" data-slide-to="{{$index}}"></div>
	</div>
	<video ng-if="pagedata.goods.video && pagedata.isvideo==1" style="width:100%;max-height:20rem" ng-src="{{tomedia(pagedata.goods.video)}}" poster="{{tomedia(pagedata.goods.image)}}" x5-playsinline="" playsinline="" webkit-playsinline="" preload="auto"  preload="auto" controls loop="loop">
	</video>
	<i ng-if="pagedata.goods.jy_commission ==1" ng-click="access_json('jy_commission/qrcode//goodsid='+pagedata.goods.id)" class="icon icon-qrcode" id="alert-click"></i>
	<!--商品活动，此处加载商品活动展示页-->
	<div ng-if="pagedata.item.active_url" ng-include="pagedata.item.active_url"></div>
</div>
<div ng-if="pagedata.goods.video" class="isvideo">
		<div style="width:6rem;margin:0 auto;">
		<span ng-class="{'videobtn':1,'active':pagedata.isvideo==1}" ng-click="pagedata.isvideo=1"><i class="icon icon-shipin1" style="font-size:0.55rem"></i> 视频</span>
		<span ng-class="{'videobtn':1,'active':pagedata.isvideo!=1}" ng-click="pagedata.isvideo=0" style="margin-left:0.5rem;"><i class="icon icon-lunbo" style="font-size:0.5rem;"></i> 图片</span>
		</div>
</div>
<div ng-if="pagedata.goods" class="fui-cell-group fui-detail-group" style="padding-bottom:8px">
<!--秒杀完成-->
<div ng-if="pagedata.goods.active.rest_time" ng-class="{'seckill-container':1,'notstart':pagedata.goods.active.status==0}">
    <div class="fui-list seckill-list" style="" >
        <div class="fui-list-media seckill-price">
            &yen;<span>{{pagedata.goods.active.price}}</span>
        </div>
        <div class="fui-list-inner">
                <div ng-if="pagedata.goods.active.tag" class="text">
                    <span class="stitle" style="white-space:nowrap; overflow:hidden; max-width:2.6rem;">{{pagedata.goods.active.tag}}</span>
                </div>
            <div class="text"><span class="oldprice">&yen;{{pagedata.goods.originalprice}}</span></div>
        </div>
    </div>
    <div class="fui-list seckill-list1" ng-if="pagedata.goods.active.nopercent!=1">
        <div class="fui-list-inner">
            <div class="text " ng-if="pagedata.goods.active.status==1">已出售 {{pagedata.goods.active.percent || 0}}%</div>
            <div class="text " ng-if="pagedata.goods.active.status==1"><span class="process"><div class="inner" style="width:{{pagedata.goods.active.percent || 0}}%"></div></span></div>
        </div>
    </div>
    <div class="fui-list seckill-list2" style="" >
        <div class="fui-list-inner">
            <div ng-if="pagedata.goods.active.status!=1" class="text ">距开始还有</div>
			<div ng-if="pagedata.goods.active.status==1" class="text ">距结束还有</div>
            <div class="text timer" ng-init="tool.time_down(pagedata.goods.active.rest_time)">
                <span class="time-hour">{{pagedata.goods.active.rest_time.hour}}</span>&nbsp;:&nbsp;<span class="time-min">{{pagedata.goods.active.rest_time.minute}}</span>&nbsp;:&nbsp;<span class="time-sec">{{pagedata.goods.active.rest_time.second}}</span>
            </div>
        </div>
    </div>
</div>
 <!--正常价格-->
    <div class="fui-cell" style='padding-bottom:0.2rem'>
        <div class="fui-cell-text">
			<div class="text">
				<span ng-if="pagedata.goods.active.title" class="red">{{pagedata.goods.active.title}}</span>
				<span ng-if="pagedata.goods.active.price && !pagedata.goods.active.rest_time" class="price" style="font-size:1rem;line-height:1.4rem"> &yen;{{pagedata.goods.active.price ||'0.00'}}</span>
				<span ng-if="!pagedata.goods.active.price" class="price" style="font-size:1rem;line-height:1.4rem"> &yen;{{pagedata.goods.price ||'0.00'}}</span>
				<span ng-if="pagedata.goods.originalprice && !pagedata.goods.active.rest_time" class="delete" style="margin-left:0.3rem"> &yen;{{pagedata.goods.originalprice}}</span>
			</div>
			<div class="subtitle">
				<span ng-if="pagedata.goods.isshowsales!=1" class="subtitle">(已售{{pagedata.goods.salenum}}{{pagedata.goods.unit || '件'}})</span>
				<span ng-if="pagedata.goods.active.sendday" class='subtitle'>发货时间：<span class="red">{{pagedata.goods.active.sendday}}</span> 天后</span>
			</div>
		</div>
		<div class="fui-cell-remark lover" style="padding-left:0;margin-top:0.1rem">
			<div class="fui-icon">
				<div ng-if="pagedata.goods.isbuyxiu==1" class="fui-tag" style="padding:0.2rem">
					<i href="javascript:;" ng-click="access_json('jy_weishop/sale.buyxiu//goodsid='+pagedata.goods.id)" class="icon icon-nvzhuangneiyi" style="font-size:0.8rem"></i>
					<div class="subtitle">买家秀</div>
				</div>
				<div class="fui-tag" style="padding:0.2rem" >
					<i href="javascript:;" ng-click="pagedata.setlike();toogle(pagedata,'islike')" ng-class="{'icon jinyunicon':1,'icon-follow':pagedata.islike !=1,'icon-xiai':pagedata.islike >0}" style="font-size:0.8rem"></i>
					<div class="subtitle">关注</div>
				</div>
			</div>
		</div>
		<div ng-if="pagedata.goods.commission_money" class="fui-cell-remark lover" style="padding-left:0;margin-top:0.1rem">
				<div class="fui-tag fui-tag-danger fee-tag" style="padding:0.25rem 0.4rem">{{pagedata.goods.commission_title}}
					<div style="padding-top:0.25rem">
					￥{{pagedata.goods.commission_money}}
					</div>
				</div>
		</div>
    </div>
    <div class="fui-cell">
		<div class="fui-cell-tag">
			<i class="fui-tag fui-tag-red">{{pagedata.goods.merch ? '商户':'自营'}}</i>
		</div>
        <div class="fui-cell-text name bold" style="font-size:0.8rem">
			 {{pagedata.goods.title}}
        </div>
    </div>
	<div class="fui-cell goods-subtitle" style="margin-top:-.2rem">
			<span class='text-block'>{{pagedata.goods.subtitle}}</span>
	</div>
	<div class="fui-cell" ng-if="pagedata.goods.pcd.province">
			<div class="fui-cell-text name">
				<span class="fui-tag subtitle" style="font-size:0.6rem"><i class="icon jinyunicon icon-map" style="font-size:0.55rem;"></i> 仓库</span>
                <span class="coupon-mini subtitle" style="font-size:0.6rem">{{pagedata.goods.pcd.province}}&nbsp{{pagedata.goods.pcd.city}}&nbsp{{pagedata.goods.pcd.district}}&nbsp{{pagedata.goods.pcd.street}} </span>
            </div>
			<div class="fui-cell-remark noremark"></div>
     </div>
	<!-- 平台开卡优惠券 -->
    <div class="fui-cell" ng-if="pagedata.shopset.giftcards_on ==1">
			<div class="fui-cell-text name" ng-click="access_json('jy_weishop/member.getcard/')">
				<span class="fui-tag fui-tag-red-o"><i class="icon jinyunicon icon-bussinesscard" style="font-size:0.4rem;"></i><span style="margin-left:3px">{{pagedata.shopset.giftcards_title ||'免费领'}}</span></span>
                <span class="coupon-mini">{{pagedata.shopset.giftcards_desc || '平台超级卡开卡送120,存100得200。戳'}} <i class="icon jinyunicon icon-yuding" style="font-size:0.5rem;color:red"></i></span>
            </div>
     </div>
	<div class="fui-cell">
		<div class="fui-cell-text flex">
			<span ng-if="pagedata.goods.dispatchprice.min && pagedata.goods.type !=1 && pagedata.goods.isverify!=2">{{pagedata.goods.ispeisong?'配送费':'快递费'}}：{{pagedata.goods.dispatchprice.min}} ~ {{pagedata.goods.dispatchprice.max}}</span>
			<span ng-if="!pagedata.goods.dispatchprice.min && pagedata.goods.dispatchprice && pagedata.goods.type !=1 && pagedata.goods.isverify!=2">{{pagedata.goods.ispeisong?'配送费':'快递费'}}：{{pagedata.goods.dispatchprice ? '￥'+ pagedata.goods.dispatchprice + '.00' : '包邮'}}</span>
			<span ng-if="pagedata.goods.province != '请选择省份' && pagedata.goods.city != '请选择城市'">{{pagedata.goods.province}} {{pagedata.goods.city}}</span>
		</div>
	</div>
</div>


<!-- 所有营销 -->
<div class="fui-cell-group fui-sale-group">
	<!-- 商品可用优惠券 -->
	<div class="fui-cell" ng-if="pagedata.sale==1 && pagedata.coupons.lenght >0" ng-include="sys_html('goods/common/_coupons')"></div>
    <!-- 会员等级 -->
    <div ng-if="pagedata.sale==1 && pagedata.isdiscount == 1 && pagedata.level.memberprice != pagedata.goods.minprice && pagedata.member.level" ng-include="sys_html('goods/common/_memberdiscount')"></div>
    <div ng-if="pagedata.sale==1 && pagedata.huodong == 1" class="fui-cell fui-sale-cell" ng-include="sys_html('goods/common/_sales')"></div>
	<!--已选参数-->
    <div ng-if="pagedata.selespename" class="fui-cell">
		<div class="fui-cell-label bold" style="width:2rem">已选</div>
        <div class="fui-cell-text" style="color:#333">
            {{pagedata.selespename}}{{pagedata.post.num}}{{pagedata.goods.unit || '件'}}<span class="subtitle" style="margin-left:0.3rem" ng-if="pagedata.goods.isshowtotal=='1'">(库存{{pagedata.options.stock}}{{pagedata.goods.unit || '件'}})</span>
        </div>
		<div class="fui-cell-remark noremark" onclick="$('#showspec').modal();" ng-click=""><i class="icon jinyunicon icon-icon-test"></i></div>
    </div>
	<div ng-if="!pagedata.selespename" class="fui-cell">
		<div class="fui-cell-label bold" style="width:2rem">已选</div>
        <div class="fui-cell-text" style="color:#333">
            {{pagedata.post.num}}{{pagedata.goods.unit || '件'}}<span class="subtitle" style="margin-left:0.3rem" ng-if="pagedata.goods.isshowtotal=='1'">(库存{{pagedata.goods.total}}{{pagedata.goods.unit || '件'}})</span>
        </div>
		<div class="fui-cell-remark noremark">
			<div class="fui-cell noborder" style="padding:0">
				<div class="fui-cell-label">数量</div>
				<div class="fui-cell-info"></div>
				<div class="fui-cell-mask noremark">
					 <div class="fui-number">
						<div class="minus" ng-click="pagedata.minus()">-</div>
						<input class="num" type="text" name="" ng-model="pagedata.post.num"/>
						<div class="plus" ng-click="pagedata.plus()">+</div>
					</div>
				</div>
			</div>
		</div>
    </div>
	<!--赠品-->
    <div ng-if="pagedata.gifts.length >0" class="fui-cell fui-sale-cell sendgoods" ng-click="access_json('jy_weishop/goods.gift//id='+pagedata.goods.gift_id)">
        <div class="fui-cell-label bold" style="width:2rem">赠品</div>
            <div ng-if="pagedata.gifts.length>1" class="fui-cell-text fui-cell-giftclick">
                <label id="gifttitle">请选择赠品</label>
                <input type="hidden" name="giftid" id="giftid" value="">
            </div>
            <div ng-if="pagedata.gifts.length<2" ng-repeat="gi in pagedata.gifts" class='fui-cell-text'>
                    {{gi.title}} <span class="subtitle">&yen;<del>{{gi.price}}</del></span>
            </div>
        <div class="fui-cell-remark noremark"><i class="icon jinyunicon icon-icon-test"></i></div>
    </div>
	<!--服务完成-->
	<div ng-if="pagedata.goods.type==0 && pagedata.shopset.no_goodssongda!=1" class="fui-cell">
		<div class="fui-cell-label bold" style="width:2rem">送至</div>
        <div class="fui-cell-text overflow-h2" style="color:#333;margin-top:0.5rem">
            <span style="width:100%" ng-if="pagedata.post.addressid">{{pagedata.address.pcd.province}}{{pagedata.address.pcd.city}}{{pagedata.address.pcd.district}}{{pagedata.address.address || '(没有详细地址信息)'}} </span>
			<span style="width:100%" ng-if="!pagedata.post.addressid">您还没有设置默认收货地址！</span><br>
			<span class="red">现货</span>，23:00前下单,预计后天({{pagedata.deliverytime}})送达
        </div>
		<div class="fui-cell-remark noremark" onclick="$('#modal_address').modal();"><i class="icon jinyunicon icon-icon-test"></i></div>
    </div>
	<div ng-if="pagedata.goods.weight && pagedata.goods.weight!='0.00'" class="fui-cell">
		<div class="fui-cell-label bold" style="width:2rem">重量</div>
        <div class="fui-cell-text" style="color:#333">
            {{pagedata.goods.weight}}kg
        </div>
    </div>
    <div class="goods-label-demo" ng-if="pagedata.goods.cash==2 || pagedata.goods.quality==1 || pagedata.goods.repair==1 || pagedata.goods.invoice ==1 || pagedata.goods.seven ==1 || pagedata.goods.labelname.length>0">
        <div class="goods-label-list goods-label-style{{pagedata.goods.style.length + 1}}">
            <span ng-if="pagedata.goods.cash==2" ng-class="{'cl-3 cl-4 cl-2':pagedata.goods.style.length<2}"><i class="icon jinyunicon icon-yuding red"></i><strong>货到付款</strong></span>
            <span ng-if="pagedata.goods.quality==1" ng-class="{'cl-3 cl-4 cl-2':pagedata.goods.style.length<2}"><i class="icon jinyunicon icon-yuding red"></i><strong>正品保证</strong></span>
            <span ng-if="pagedata.goods.repair==1" ng-class="{'cl-3 cl-4 cl-2':pagedata.goods.style.length<2}"><i class="icon jinyunicon icon-yuding red"></i><strong>保修</strong></span>
            <span ng-if="pagedata.goods.invoice ==1" ng-class="{'cl-3 cl-4 cl-2':pagedata.goods.style.length<2}"><i class="icon jinyunicon icon-yuding red"></i><strong>发票</strong></span>
            <span ng-if="pagedata.goods.seven ==1" ng-class="{'cl-3 cl-4 cl-2':pagedata.goods.style.length<2}"><i class="icon jinyunicon icon-yuding red"></i><strong>7天退换</strong></span>
            <span ng-repeat="value in pagedata.goods.labelname" ng-class="{'cl-3 cl-4 cl-2':pagedata.goods.style.length<2}"><i class="icon jinyunicon icon-yuding red"></i><strong>{{value.title}}</strong></span>
            <div style="clear: both;"></div>
        </div>
    </div>
	<!--配送区域完成-->
    <div ng-if="pagedata.has_city==1" class='fui-cell'>
        <div ng-if="pagedata.dispatch.isdispatcharea==0" class='fui-cell-label bold' style="width:auto">不配送区域:</div>
		<div ng-if="pagedata.dispatch.isdispatcharea!=0" class='fui-cell-label bold' style="width:auto">只配送区域:</div>
		<div class="fui-cell-text">
			<span ng-repeat="(ke,v) in pagedata.citys" class="fui-tag fui-tag-red-o sale-tip">{{ke}}</span>
		 </div>
        <div class='fui-cell-remark noremark' onclick="$('#showhas_city').modal();"><i class="icon jinyunicon icon-icon-test"></i></div>
    </div>
</div>
<div ng-if="pagedata.stores.length >0 && pagedata.shopset.no_goodsstore!=1" class='fui-according-group' ng-include="sys_html('goods/common/_stores')"></div>

<!--数量规格-->
 <!--   <div ng-if="pagedata.goods.canbuy && pagedata.goods.type!=4" class="fui-cell-group fui-cell-click">
        <div class="fui-cell">
            <div ng-if="empty(pagedata.spec_titles)" class="fui-cell-text option-selector">请选择数量</div>
            <div ng-if="!empty(pagedata.spec_titles)" class="fui-cell-text option-selector" href="javascript:" ng-click="pagedata.post.id=item.id" onclick="$('#spec').modal();" >请选择数量</div>
			<div ng-if="!empty(pagedata.spec_titles)" class="fui-cell-text option-selector" href="javascript:" ng-click="pagedata.post.id=item.id" onclick="$('#spec').modal();" >请选择{{pagedata.spec_titles}}等</div>
            <div class="fui-cell-remark"></div>
        </div>
    </div>-->
<div ng-if="pagedata.packages && pagedata.goods.total>0" ng-include="sys_html('goods/common/_packages')"></div>
<!--店铺信息-->
<div ng-if="pagedata.shopset.no_goodsshop!=1" ng-include="sys_html('goods/common/_myshop')"></div>
<!--购买后显示-->
<div ng-if="pagedata.buyshow==1 && !pagedata.goods.buycontent" class="fui-cell-group">
    <div class="fui-cell">
        <div class="content-block">{{pagedata.goods.buycontent}}</div>
    </div>
</div>
<div ng-include="sys_html('goods/common/_commentsdetail')"></div>
<!--商品详情已完成-->
<div class="detail-block" style="position: relative;margin-top:0.5rem;border-radius: 0.5rem;width:100%;background:#fff;padding-bottom:0">
		<div class="fui-cell-text bold" style="padding:0.5rem">商品详情</div>
		<div style="padding:0.4rem 0.5rem;padding-top:0">
			 <div class="fui-cell-group notop" style="background:#f2f2f2;margin-bottom:0.4rem">
				<div ng-repeat="p in pagedata.goods.param" class="fui-cell" style="padding:0.5rem">
					<div class="fui-cell-label md" style="color:#666">{{p.title}}</div>
					<div class="fui-cell-info  md" style="color:#333">{{p.value}}</div>
				</div>
			</div>
		</div>
        <div class="content-block content-images" ng-bind-html="trust(pagedata.goods.content)"></div>
		<div class="content-block content-images" ng-bind-html="trust(pagedata.goods.footerinfo)"></div>
</div>
<div class="fui-cell-group" ng-if="pagedata.hot_list.length >0" ng-include="sys_html('goods/common/_hotgoods')"></div>
</div>
<!-- 下面是弹窗系列 -->
<!--赠品弹层-->
<div ng-if="pagedata.isgift==1 && pagedata.goods.total>0" id='gift-picker-modal' style="margin:-100%;" ng-include="sys_html('goods/common/_giftmodal')"></div>
<!--配送区域弹层-->
<div id="showhas_city" class="modal fade" tabindex="-1" style="z-index:99999;display:none;">
<div class="modal-dialog" style="width:100%;left:0;bottom:0">
<div class="modal-bottom">
    <div class='city-picker'>
        <div ng-if="pagedata.dispatch.isdispatcharea==0" class='fui-cell-title text-center' style="background: white;">不配送区域</div>
        <div ng-if="pagedata.dispatch.isdispatcharea==1" class='fui-cell-title text-center' style="background: white;">只配送区域</div>
        <div class="fui-cell-group fui-sale-group" style="margin-top:0; overflow-y: auto;">
            <div class="fui-cell">
                <div class="fui-cell-text dispatching">
                    <div class="dispatching-info">
             
                        <i ng-repeat="(key,item) in pagedata.citys">{{key}}</i>
                     
                    </div>
                </div>
            </div>
        </div>
    </div>
	<div class="fui-navbar">
			<a href="javascript:;" aria-hidden="true" data-dismiss="modal" class="nav-item btn btn-danger confirmbtn">确定</a>
	</div>
</div>
</div>
</div>
<!-- 促销活动层 -->
<div id="showhuodong" class="modal fade" tabindex="-1" style="z-index:99999;display:none;">
<div class="modal-dialog" style="width:100%;left:0;bottom:0">
<div class="modal-bottom">
    <div class='picker-sales page-goods-detail'>
        <div class='fui-cell-title text-center' style="background: white;">活&nbsp;动</div>
        <div class="fui-cell-group fui-sale-group noborder" style="margin-top:0; overflow-y: auto;">
            <!-- 商城满减 -->
				<div ng-if="pagedata.saleset.enough.length>0">
                <div  class="fui-cell fui-sale-cell">
                    <div class="fui-cell-label" style="width:2rem">
                        <span class="fui-tag-red-big-o sale-tip">满减</span>
                    </div>
                    <div class="fui-cell-text" style="white-space: inherit;">
                        <div ng-repeat="(key,enough) in pagedata.saleset.enough">全场 满<span class="text-danger">&yen;{{enough.man}}</span>立减<span class="text-danger">&yen;{{enough.jian}}</span></div>
                    
                    </div>
                </div>
                </div>

            <!-- 商户满减 -->
          
            <div ng-if="pagedata.saleset.enoughdeduct && !pagedata.seckillinfo" class="fui-cell fui-sale-cell">
                <div class="fui-cell-label" style="width:2rem">
                    <span class="fui-tag-red-big-o sale-tip">满减</span>
                </div>
                <div class="fui-cell-text" style="white-space: inherit;">
                  
                    <div ng-repeat="(key,enough) in pagedata.saleset.enoughs">商户 满<span class="text-danger">&yen;{{enough.enough}}</span>立减<span class="text-danger">&yen;{{enough.give}}</span></div>
                  
                </div>
            </div>
           

            <!-- 包邮 -->
			 <div ng-if="pagedata.manjian" class="fui-cell fui-sale-cell">
                    <div class="fui-cell-label" style="width:2rem">
                        <span class="fui-tag-red-big-o sale-tip">包邮</span>
                    </div>
                    <div class="fui-cell-text">
							<div ng-if="pagedata.saleset.baoyou_status ==1">全场满 <span class="text-danger">&yen;{{pagedata.saleset.baoyou_man}}</span> 包邮;</div>
							<div ng-if="pagedata.goods.fullnum>0">单品满 <span class="text-danger">{{pagedata.goods.fullnum}}</span> {{pagedata.goods.unit || '件'}}包邮; </div>
							<div ng-if="pagedata.goods.fullmoney>0">单品满 <span class="text-danger">&yen;{{pagedata.goods.fullmoney}}</span> 包邮; </div>
                        
                    </div>
                </div>	
            <!-- 积分 -->
            <div ng-if="pagedata.deduct_credit" class="fui-cell fui-sale-cell">
                <div class="fui-cell-label" style="width:2rem">
                    <span class="fui-tag-red-big-o sale-tip">积分</span>
                </div>
                <div class="fui-cell-text">
                    <div ng-if="pagedata.goods.deduct && pagedata.goods.deduct != '0.00'">最高抵扣<span class="text-danger">&yen;{{pagedata.goods.deduct}}</span></div>
                    <div ng-if="pagedata.goods.credit">购买赠送<span class="text-danger">{{pagedata.goods.credit}}</span>积分</div>
                </div>
            </div>
            <!-- 二次购买 -->
            
            <div ng-if="pagedata.goods.buyagain>0" class="fui-cell fui-sale-cell">
                <div class="fui-cell-label" style="width:2rem">
                    <span class="fui-tag-red-big-o sale-tip">复购</span>
                </div>
                <div class="fui-cell-text">
                    此商品重复购买可享受<span class="text-danger">{{pagedata.goods.buyagain}}</span>折优惠
					<span ng-if="!pagedata.goods.buyagain_sale"> 
					重复购买 不与其他优惠共享
					</span>
                </div>
            </div> 
            <div ng-if="pagedata.isfullback" class="fui-cell fui-sale-cell">
                <div class="fui-cell-label" style="width:2rem">
                    <span class="fui-tag-red-big-o sale-tip">全返</span>
                </div>
                <div class="fui-cell-text" style="white-space: inherit;">
                    <div class="fullback-info">
                    <p ng-if="pagedata.fullbackgoods.type>0 && pagedata.goods.hasoption > 0 && pagedata.fullbackgoods.minallfullbackallratio == pagedata.fullbackgoods.maxallfullbackallratio" style="display: block;"><i>&yen;</i>全返总额：&yen; {{pagedata.fullbackgoods.minallfullbackallratio}}%
                    <p ng-if="pagedata.fullbackgoods.type>0 && pagedata.goods.hasoption > 0 && pagedata.fullbackgoods.minallfullbackallratio != pagedata.fullbackgoods.maxallfullbackallratio" style="display: block;"><i>&yen;</i>全返总额：&yen; {{pagedata.fullbackgoods.minallfullbackallratio}}% ~ {{pagedata.fullbackgoods.maxallfullbackallratio}}%
                    <p ng-if="pagedata.fullbackgoods.type>0 && pagedata.goods.hasoption <= 0 " style="display: block;"><i>&yen;</i>全返总额： &yen;{{pagedata.fullbackgoods.minallfullbackallratio}}%
                    <p ng-if="pagedata.fullbackgoods.type<=0 && pagedata.goods.hasoption > 0 && pagedata.fullbackgoods.minallfullbackallprice != pagedata.fullbackgoods.maxallfullbackallprice " style="display: block;"><i>&yen;</i>全返总额： &yen;{{pagedata.fullbackgoods.minallfullbackallprice}}
                    <p ng-if="pagedata.fullbackgoods.type<=0 && pagedata.goods.hasoption > 0 && pagedata.fullbackgoods.minallfullbackallprice == pagedata.fullbackgoods.maxallfullbackallprice " style="display: block;"><i>&yen;</i>全返总额： &yen;{{pagedata.fullbackgoods.minallfullbackallprice}} ~ &yen;{{pagedata.fullbackgoods.maxallfullbackallprice}}
                    <p ng-if="pagedata.fullbackgoods.type<=0 && pagedata.goods.hasoption <= 0 " style="display: block;"><i>&yen;</i>全返总额： &yen;{{pagedata.fullbackgoods.minallfullbackallprice}}
                    </p>
					<p ng-if="pagedata.fullbackgoods.type>0 && pagedata.goods.hasoption>0 && pagedata.fullbackgoods.minfullbackratio == pagedata.fullbackgoods.maxfullbackratio" style="display: block;"><i>&yen;</i>每天返:{{pagedata.fullbackgoods.minallfullbackallratio}}%</p>
					<p ng-if="pagedata.fullbackgoods.type>0 && pagedata.goods.hasoption>0 && pagedata.fullbackgoods.minfullbackratio != pagedata.fullbackgoods.maxfullbackratio" style="display: block;"><i>&yen;</i>{{pagedata.fullbackgoods.minallfullbackallratio}}% ~ {{pagedata.fullbackgoods.maxallfullbackallratio}}%</p>
					<p ng-if="pagedata.fullbackgoods.type>0 && pagedata.goods.hasoption<=0" style="display: block;"><i>&yen;</i>每天返:{{pagedata.fullbackgoods.fullbackratio}}%</p>
					<p ng-if="pagedata.fullbackgoods.type<=0 && pagedata.goods.hasoption>0 && pagedata.fullbackgoods.minfullbackprice == pagedata.fullbackgoods.maxfullbackprice" style="display: block;"><i>&yen;</i>每天返:&yen;{{pagedata.fullbackgoods.minallfullbackallprice}}</p>
					<p ng-if="pagedata.fullbackgoods.type<=0 && pagedata.goods.hasoption>0 && pagedata.fullbackgoods.minfullbackprice != pagedata.fullbackgoods.maxfullbackprice" style="display: block;"><i>&yen;</i>每天返:&yen;{{pagedata.fullbackgoods.minallfullbackallprice}} ~ &yen;{{pagedata.fullbackgoods.maxfullbackprice}}</p>
					<p ng-if="pagedata.fullbackgoods.type<=0 && pagedata.goods.hasoption<=0" style="display: block;"><i>&yen;</i>每天返:&yen;{{pagedata.fullbackgoods.fullbackratio}}</p>
                    <p ng-if="pagedata.goods.hasoption>0 && pagedata.fullbackgoods.minday == pagedata.fullbackgoods.maxday" style="display: block;"><i>&yen;</i>时间：{{pagedata.fullbackgoods.minday}}</p>
                    <p ng-if="pagedata.goods.hasoption>0 && pagedata.fullbackgoods.minday != pagedata.fullbackgoods.maxday" style="display: block;"><i>&yen;</i>时间：{{pagedata.fullbackgoods.minday}} ~ {{pagedata.fullbackgoods.maxday}}</p>
                    <p ng-if="pagedata.goods.hasoption<=0" style="display: block;"><i>&yen;</i>时间：{{pagedata.fullbackgoods.day}}</p>
                    </div>
                  
                    <div ng-if="pagedata.fullbackgoods.startday>0" class="fullback-remark" style="line-height: inherit;">
                        确认收货{{pagedata.fullbackgoods.startday}}天后开始全返。如申请退款，则全返金额退还。
                    </div>
                   
                </div>
            </div>
            
        </div>
		<div class="fui-navbar">
				<a href="javascript:;" aria-hidden="true" data-dismiss="modal" class="nav-item btn btn-danger confirmbtn">确定</a>
		</div>
    </div>
</div>
</div>
</div>
<div ng-if="pagedata.goods.type ==4" ng-include="sys_html('goods/wholesalePicker')"></div>
<div class='fui-content' ng-if="!pagedata.goods">
    <div class='content-empty'>
        <i class='icon icon-searchlist'></i><br/> 商品已经下架，或者已经删除!<br/><a href="{php echo mobileUrl()}" class='btn btn-default-o external'>到处逛逛</a>
    </div>
</div>
<!--分享弹层-->
<div id="showsharecover" class="modal fade" tabindex="-1" style="z-index:99999;display:none;">
<div class="modal-dialog" style="width:100%;left:0;top:0">
	<div id="cover">
		<div class='fui-mask-m visible'></div>
		<div class='arrow'></div>
		<div ng-if="!pagedata.goods.share_title" class='content'>请点击右上角<br/>通过【发送给朋友】<br/>邀请好友购买</div>
		<div ng-if="pagedata.goods.share_title" class='content'>请点击右上角<br/>通过【发送给朋友】<br/>邀请好友购买{{pagedata.goods.share_title}}</div>
	</div>
</div>
</div>
<!--客服二维码展示弹层-->
<div id="show_kfewm_modal" class="modal fade" tabindex="-1" style="z-index:99999;display:none;">
<div class="modal-dialog" style="width:80%;left:10%;top:10%;">
	<div class="modal-content" style="padding:0.5rem">
		<div class="title c">请长按扫描下面的二维码联系客服</div>
		<div class="image"><img style="width:100%" ng-src="{{tomedia(pagedata.kfewm) || '../core/resource/images/nopic.jpg'}}"></img></div>
	</div>
</div>
</div>
<!--优惠券弹层完成-->
<div ng-include="sys_html('coupon/common/_couponpicker')"></div>

</div>
<!--底部按钮-->
<div class="fui-navbar bottom-buttons">
	<a ng-if="pagedata.goods.merchid!=0 && pagedata.goods.merch.showkefu==1" class="nav-item favorite-item active" ng-click="access_json('jy_kefu/home//p=jy_merch&pid='+pagedata.goods.merchid)" >
        <span class="icon jinyunicon icon-xiaoxi1" style="color:{{main.syscolor||'red'}};"></span>
        <span class="label" >客服</span>
    </a>
	
	<a ng-if="pagedata.goods.merchid==0 && pagedata.kfewm" class="nav-item favorite-item active" onclick="$('#show_kfewm_modal').modal()" href="javascript:;">
        <span class="icon jinyunicon icon-xiaoxi1" style="color:{{main.syscolor||'red'}};"></span>
        <span class="label" >客服</span>
    </a>

	<a ng-if="pagedata.goods.merchid==0 && !pagedata.kfewm && pagedata.shopset.kflink" class="nav-item favorite-item active" href="{{pagedata.shopset.kflink}}">
        <span class="icon jinyunicon icon-xiaoxi1" style="color:{{main.syscolor||'red'}};"></span>
        <span class="label" >客服</span>
    </a>
	<a ng-if="pagedata.goods.myshopmid>0 && pagedata.goods.merchid ==0" class="nav-item external" href="javascript:" ng-click="access_json('jy_commission/index//mid='+pagedata.goods.myshopmid)">
        <span class="icon jinyunicon icon-dianpu"></span>
        <span class="label" >小店</span>
    </a>
	<a ng-if="pagedata.goods.merchid>0" class="nav-item external" href="javascript:" ng-click="access_json('jy_weishop/merch//merchid='+pagedata.goods.merchid)">
        <span class="icon jinyunicon icon-dianpu"></span>
        <span class="label" >小店</span>
    </a>
	<a ng-if="pagedata.goods.merchid==0 && pagedata.goods.myshopmid==0" class="nav-item external" href="javascript:" ng-click="access_json(main.menus[0].action || 'jy_weishop/index/')">
        <span class="icon jinyunicon icon-dianpu"></span>
        <span class="label" >首页</span>
    </a>
    <a class="nav-item cart-item" href="javascript:" ng-click="access_json('jy_weishop/member.cart/')" id="menucart">
        <span ng-if="pagedata.cartCount<=0" class='badge out'>{{pagedata.cartCount}}</span>
        <span ng-if="pagedata.cartCount>0" class='badge in'>{{pagedata.cartCount}}</span>
        <span class="icon jinyunicon icon-tianmaochaoshigouwuche"></span>
        <span class="label">购物车</span>
    </a>
    <a ng-if="!pagedata.selespename && (pagedata.canAddCart || pagedata.post.isdish) && pagedata.goods.canbuy" class="nav-item btn cartbtn"  href="javascript:" ng-click="post(pagedata.post,'jy_weishop/goods.detail/addtocart/')">加入购物车</a>
    <a ng-if="pagedata.selespename && (pagedata.canAddCart || pagedata.post.isdish) && pagedata.goods.canbuy" class="nav-item btn cartbtn"  href="javascript:" onclick="$('#showspec').modal();">加入购物车</a>
	<a ng-if="!pagedata.post.isdish && pagedata.seckillinfo &&  pagedata.seckillinfo.status==1 && pagedata.goods.canbuy"  class="nav-item btn buybtn seckill-notstart" href="javascript:" ng-click="pagedata.check_buy()">原价购买</a>
    <a ng-if="!pagedata.post.isdish &&! pagedata.selespename && (!pagedata.seckillinfo ||  pagedata.seckillinfo.status!=1) && pagedata.goods.canbuy" class="nav-item btn buybtn" href="javascript:" ng-click="pagedata.check_buy()">立刻购买</a>
	<a ng-if="!pagedata.post.isdish && pagedata.selespename && (!pagedata.seckillinfo ||  pagedata.seckillinfo.status!=1) && pagedata.goods.canbuy" class="nav-item btn buybtn" href="javascript:" onclick="$('#showspec').modal();">立刻购买</a>
	<a ng-if="!pagedata.goods.canbuy" class="nav-item btn cartbtn disabled">{{pagedata.goods.nobuytitle}}</a>
</div>
<!--分享二维码弹层-->
<div id="showsharecode" class="modal fade" tabindex="-1" style="z-index:99999;display:none;">
<div class="modal-dialog" style="width:100%;left:0;bottom:0">
<div class="modal-bottom">
    <div ng-if="pagedata.commission_data.codeShare==1" class="alert-content">
        <div class="alert" style="padding:0;">
            <i class="alert-close alert-close1 icon icon-close"></i>
            <div class="fui-list alert-header" style="-webkit-border-radius: 0.3rem;border-radius: 0.3rem;padding:0;">
                <img ng-src="{{tomedia(pagedata.goodscode)}}" width="100%" height="100%" class="alert-goods-img" alt="">
            </div>
        </div>
    </div>

    <div ng-if="pagedata.commission_data.codeShare==2" class="alert-content">
        <div class="alert2">
            <div class="fui-list alert-header" style="-webkit-border-radius: 0.3rem;border-radius: 0.3rem;padding:0;">
                <img ng-src="{{tomedia(pagedata.goodscode)}}" width="100%" height="100%" class="alert-goods-img" alt="">
            </div>
        </div>
    </div>

    <div ng-if="pagedata.commission_data.codeShare!=1 && pagedata.commission_data.codeShare!=2" class="alert-content">
        <div class="alert" style="padding:0;background: #f5f4f9;border:none;-webkit-border-radius: 0.3rem;border-radius: 0.3rem;top:2rem;">
            <i class="alert-close alert-close1 icon icon-close" style="right: -0.7rem;top: -0.8rem;background: #e1040d;border:none;z-index:10"></i>
            <div class="fui-list alert-header" style="-webkit-border-radius: 0.3rem;border-radius: 0.3rem;padding:0;">
                <img ng-src="{{tomedia(pagedata.goodscode)}}" class="alert-goods-img" alt="">
            </div>

        </div>
    </div>
</div>
</div>
</div>
<div id="modal_address"  class="modal fade" tabindex="-1" style="z-index:99999;display:none;">
	<div class="modal-dialog" style="width:100%;left:0;bottom:0">
	<div class="modal-bottom">
		<div ng-if="pagedata.isadd_address!=1" class="fui-content" style="background:#fff">
			<div class="fui-cell-title text-center">送至</div>
			<div ng-if="pagedata.address_list.length" class="fui-list-group address-item modal-swiper-y">
				<div class="fui-list" ng-repeat="item in pagedata.address_list">
					<div class="fui-list-inner">
						<div class="title red"><span class='realname'>{{item.name}}</span> <span class='mobile'>{{item.mobile}}</span></div>
						<div class="text red"><span class='address'>{{item.pcd.province}}&nbsp{{item.pcd.city}}&nbsp{{item.pcd.district}}&nbsp{{item.address}}</span></div>
					</div>
					<div class='fui-list-angle'>
                        <label class='radio-inline'>
							<input type="radio" class="fui-radio  fui-radio-danger" ng-checked="pagedata.address.id == item.id" ng-click="pagedata.change_address(item.id)"/>
						</label>
                    </div>
				</div>
			</div>
			<div ng-if="!pagedata.address_list.length" class='content-empty' style="margin:0">
				<i class='icon jinyunicon icon-search'></i><br/> 您还没有地址？~ 添加一个吧 ~<br/><a ng-click="pagedata.isadd_address=1" class='btn btn-sm btn-default-o external'>添加地址</a>
			</div>
			<div ng-if="pagedata.address_list.length" class="fui-navbar">
				<a href="javascript:;" aria-hidden="true" data-dismiss="modal" class="nav-item btn btn-danger confirmbtn">确定</a>
			</div>
		</div>
		<div ng-if="pagedata.isadd_address==1" class="fui-content" style="background:#fff">
			<div class="fui-cell-title text-center">添加地址</div>
			<div class='fui-cell-group'>
                <div class='fui-cell'>
                    <div class='fui-cell-label'>收件人</div>
                    <div class='fui-cell-info'><input type="text" ng-model="pagedata.address.name" placeholder="收件人" class="fui-input"/></div>
                </div>
                <div class='fui-cell'>
                    <div class='fui-cell-label'>联系电话</div>
                    <div class='fui-cell-info'><input type="tel" ng-model="pagedata.address.mobile" placeholder="联系电话"  class="fui-input"/></div>
                </div>

                <div class="fui-cell">
					<div class="fui-cell-label ">地区</div>
					<div class="fui-cell-label" style="width:28%">
						<select ng-model="pagedata.address.pcd.province" class="form-control tpl-province">
						<option value="" selected="selected">省份</option>
						<option ng-repeat="(value,data) in pagedata.province" value="{{value}}" ng-selected="pagedata.address.pcd.province==value">{{value}}</option>
						</select>
					</div>
					<div class="fui-cell-label" style="width:28%">
						<select ng-model="pagedata.address.pcd.city" class="form-control tpl-city">
						<option value="" selected="selected">城市</option>
						<option ng-repeat="(value,data) in pagedata.province[pagedata.address.pcd.province]" value="{{value}}" ng-selected="pagedata.address.pcd.city==value">{{value}}</option>
						</select>
					</div>
					<div class="fui-cell-label" style="width:28%">
						<select ng-model="pagedata.address.pcd.district" class="form-control tpl-district">
						<option value="" selected="selected">区县</option>
						<option ng-repeat="(value,data) in pagedata.province[pagedata.address.pcd.province][pagedata.address.pcd.city]" value="{{value}}" ng-selected="pagedata.address.pcd.district==value">{{value}}</option>
						</select>
					</div>
					<div class="fui-cell-label" style="width:28%">
						<select ng-model="pagedata.address.pcd.street" class="form-control tpl-district">
						<option value="" selected="selected">街道</option>
						<option ng-repeat="value in pagedata.province[pagedata.address.pcd.province][pagedata.address.pcd.city][pagedata.address.pcd.district]" value="{{value}}" ng-selected="pagedata.address.pcd.street==value">{{value}}</option>
						</select>
					</div>
				</div>
                <div class='fui-cell'>
                    <div class='fui-cell-label'>详细地址</div>
                    <div class='fui-cell-info'><input type="text" ng-model="pagedata.item.address.address" placeholder='街道，楼牌号等'  class="fui-input"/></div>
                </div>
            </div>
			<div class="fui-navbar">
				<a ng-click="pagedata.add_address();" class="nav-item btn btn-danger confirmbtn">确定</a>
			</div>
		</div>
	</div>
	</div>
</div>
<div id="showspec" class="modal fade" tabindex="-1" style="z-index:99999;display:none;">
<div class="modal-dialog" style="width:100%;left:0;bottom:0">
<div class="modal-content" ng-include="sys_html('goods/picker')"></div>
</div>
</div>
<div id="showstoreitem"  class="modal fade" tabindex="-1" style="z-index:99999;display:none;">
	<div class="modal-dialog" style="width:100%;left:0;bottom:0">
		<div class="modal-bottom">
			<div class="fui-cell-group">
				<div class="fui-cell">
					<div class="fui-cell-label" style="width:100px;font-size:0.9rem">{{pagedata.storeitem.title}}</div>
				</div>
				<div class="fui-cell noborder">
					<div class="fui-cell-label bold" style="width:80px;">地址：</div>
					<div class="fui-cell-info">{{pagedata.storeitem.pcd.province}} {{pagedata.storeitem.pcd.city}} {{pagedata.storeitem.pcd.district}} {{pagedata.storeitem.pcd.street}} {{pagedata.storeitem.address}}</div>
				</div>
				<div class="fui-cell noborder">
					<div class="fui-cell-label bold" style="width:80px;">联系人：</div>
					<div class="fui-cell-info">{{pagedata.storeitem.realname}}</div>
				</div>
				<div class="fui-cell noborder">
					<div class="fui-cell-label bold" style="width:80px;">联系电话：</div>
					<div class="fui-cell-info">{{pagedata.storeitem.mobile}}</div>
				</div>
			</div>
			<div class="fui-navbar">
				<a href="javascript:;"  aria-hidden="true" data-dismiss="modal" class="nav-item btn btn-danger confirmbtn">关闭</a>
			</div>
		</div>
	</div>
</div>
<div ng-if="pagedata.showshareall" class="popup">
	<div class="popup-body">
		<div class="popup-bottom" style="min-height:auto;padding-bottom:3rem">
			<div class="fui-cell-group">
				<div  class="fui-cell">
					<div class="fui-cell-text c">
						<div class="text bold" ng-click="pagedata.tj()" style="font-size:0.8rem"><i class="icon icon-good"></i> 推荐好物</div>
						<div class="c" style="color:#999">(分享到好物圈)</div>
					</div>
				</div>
				<div class="fui-cell">
					<div class="fui-cell-text c">
						<div class="text bold" onclick="$('#showsharecover').modal();" style="font-size:0.8rem">发送给朋友</div>
					</div>
				</div>
				<div ng-if="pagedata.goods.isposter==1" class="fui-cell">
					<div class="fui-cell-text c">
						<div class="text bold" ng-click="pagedata.showposter=true" style="font-size:0.8rem">生成海报</div>
					</div>
				</div>
			</div>
			<div class="fui-navbar">
				<a href="javascript:;" ng-click="pagedata.showshareall=false;pagedata.showposter=false" class="nav-item btn btn-danger confirmbtn" style="background: #fcafab;">取消</a>
			</div>
		</div>
		<div ng-if="pagedata.showposter" class="popup-center" style="width:70%;top:42%">
			<div class="fui-content c" style="height:auto;border: 1px solid #fdd8d6;border-radius:0.3rem;padding-bottom:0;background:#fff">
				<img src="{{pagedata.posterimg || att_url+'../core/resource/images/nopic.jpg'}}" style="border-radius:0.3rem;width:100%;height:auto"/>
				<a class="btn btn-sm btn-danger-o external" style="line-height: 1.1rem;border-radius:1rem;margin:0.2rem;font-size:0.65rem;">长按保存图片</a>
			</div>
		</div>
	</div>
</div>
<!--弹目-->
<div class="video-sms-list" style="bottom:500px"></div>
<style type="text/css">
    .share-text1{text-align: center;padding:0.5rem 0.5rem 0;font-size:0.6rem;color:#666;line-height: 1rem;}
    .share-text2{text-align: center;padding:0 0.5rem 0.5rem;font-size:0.6rem;color:#666;line-height: 1rem;}
</style>
<div ng-include="sys_html('common/_footer')"></div>
<script type="text/javascript">
scope.pagedata.nodata_pic='../core/resource/images/goods_nodata.jpg';
require(['bootstrap', 'hammer'], function($, Hammer){
		$('#carousel-container').carousel();
		var mc = new Hammer($('#carousel-container').get(0));
		mc.on("panleft", function(ev) {
			$('#carousel-container').carousel('next');
		});
		mc.on("panright", function(ev) {
			$('#carousel-container').carousel('prev');
		});
		
});
scope.pagedata.tj=function(){
	var jsCheckObject={
		'appid':jssdkconfig.appId,
		'timestamp':jssdkconfig.timestamp,
		'noncestr':jssdkconfig.nonceStr,
		'signature':jssdkconfig.signature,
		'url':scope.pagedata.goods.url
		};
	if(scope.pagedata.goods.status==0){
		var status =2;
	}else if(scope.pagedata.goods.status==2){
		var status =3;
	}else{
		var status =1;
	}
	var sku={
		'sku_id':scope.pagedata.goods.id, 
		'price':(scope.pagedata.goods.price)*100,
		'original_price':(scope.pagedata.goods.originalprice)*100,
		'status':status
	}
	var productObject={
		'item_code':scope.pagedata.goods.id,
		'title':scope.pagedata.goods.title,
		'desc':scope.pagedata.goods.subtitle,
		'category_list':scope.pagedata.jy_hwqset.category_list?scope.pagedata.jy_hwqset.category_list:{"category_id": 4342,"category_name": "运动裤"}, //类目列表
		'image_list':scope.pagedata.images,
		'src_h5_path':scope.pagedata.url,
		'sku_list':sku,
		
	};
	//console.log(productObject)
	var jsCheckObject1 = encodeURIComponent(JSON.stringify(jsCheckObject))
	var productObject1 = encodeURIComponent(JSON.stringify(productObject))
	wx.openBusinessView({
	  businessType: 'friendGoodsRecommend',
	  queryString: 'jsCheck='+jsCheckObject1+'&product='+productObject1,
	  success: function (res) {
	  //{"err_msg":"errmsg","extraData":{}}
	  },
	  fail: function (res){
		scope.message(res.errMsg);
	  // alert('请检查参数配置或者公众号权限');
	  //{"err_msg":"errmsg"}
	  }
	})
}
//滚动加载
scope.pagedata.scroll_bottom=function(){
	if(scope.pagedata.showtype==0){
		if(scope.pagedata.scroll_bottomtimes){
			scope.pagedata.scroll_bottomtimes++
		}else{
			scope.pagedata.scroll_bottomtimes=1;
		}
		if(scope.pagedata.scroll_bottomtimes==1){
			scope.pagedata.showupto = 1
		}
	}
}
scope.pagedata.goDetail=function(id){
	scope.pagedata.showtype = 0;
	if(id=='goodscontent'){
		scope.pagedata.isgoodscontent = 1;
	}else{
		scope.pagedata.isgoodscontent = 0;
	}
	scope.$evalAsync();
	setTimeout(function(){
		var element = document.getElementById(id);
		element.scrollIntoView();
		element.scrollIntoView(false);
		element.scrollIntoView({block: "start"});
		element.scrollIntoView({behavior: "smooth", block: "start", inline: "nearest"});
	},200);
}
//减少
scope.pagedata.minus=function(){
	if(scope.pagedata.post.num <=1){
		return false;
	}
	scope.pagedata.post.num--;
	scope.$evalAsync();
}
//增加
scope.pagedata.plus=function(){
	if(parseInt(scope.pagedata.goods.usermaxbuy)>0 && parseInt(scope.pagedata.goods.order_goodscount) + parseInt(scope.pagedata.post.num)>=parseInt(scope.pagedata.goods.usermaxbuy)){
		scope.message('不能再加了，你已购买'+scope.pagedata.goods.order_goodscount+'件，超过该商品最大购买量'+scope.pagedata.goods.usermaxbuy+'！','error');
		return false;
	}
	if(parseInt(scope.pagedata.goods.maxbuy)>0 && parseInt(scope.pagedata.post.num)>=parseInt(scope.pagedata.goods.maxbuy)){
		scope.message('不能再加了，超过该商品单次购买'+scope.pagedata.goods.maxbuy+'量！','error');
		return false;
	}
	if(parseInt(scope.pagedata.post.num)>=parseInt(scope.pagedata.options.stock)){
		scope.message('不能再加了，超了库存'+scope.pagedata.options.stock+'啦！','error');
		return false;
	}
	scope.pagedata.post.num++;
	scope.$evalAsync();
}
//选择
scope.pagedata.get_optionsid=function(){
	var specid = scope.pagedata.post.specid;
		specid = specid.join('_');
	scope.post_json('jy_weishop/goods.detail/get_optionsid/',{'specid':specid},function(res){
			console.log(specid);
			scope.pagedata.post.optionsid=res.options.id;
			scope.pagedata.options=res.options;
			scope.pagedata.goods.price=res.options.price;
			scope.pagedata.goods.image=res.options.thumb?res.options.thumb:scope.pagedata.goods.image;
			scope.pagedata.goods.originalprice=res.options.productprice;
			scope.pagedata.selespename=res.selespename;
			scope.$evalAsync();
	});
}
scope.pagedata.add_address=function(){
	scope.pagedata.address.res=1
	scope.post_json('core/member.address/post/',scope.pagedata.address,function(res){
			scope.pagedata.post.addressid =res;
			$('#modal_address').modal('hide');
			scope.$evalAsync();
	});
}
//选择地址
scope.pagedata.change_address=function(id){
	scope.post_json('jy_weishop/goods.detail/change_address/',{'addressid':id},function(res){
			scope.pagedata.post.addressid=res.address.id;
			scope.pagedata.address=res.address;
			scope.$evalAsync();
	});
}
//获取关注
scope.pagedata.setlike=function(){
	var params={
		op:'like',
		callback:function(res){
		}
	};
	scope.post_json(params);
}
//if(scope.pagedata.goods.type==3 || (scope.pagedata.goods.type==0 && scope.pagedata.goods.isverify==1)){
	scope.pagedata.post.storeid =0;
	scope.pagedata.getstores=function(lat_lng){
		var id=scope.pagedata.goods.id;
		scope.post_json('/get_data/getstores/',{'lat_lng':lat_lng,'id':id},function(res){
				scope.pagedata.stores =res.stores
				scope.pagedata.stores_count =res.stores_count
				scope.pagedata.post.storeid = res.stores[0].id;
				scope.pagedata.selectstore = res.stores[0];
				scope.$evalAsync();
		});
	}
	// 百度地图API功能
	if(!scope.pagedata.lat_lng){
		window.scope.location(function(re){
			scope.pagedata.getstores(re.lat_lng);
		});
	}else{
		scope.pagedata.getstores(scope.pagedata.lat_lng);
	}
//}
scope.pagedata.showstoreitem=function(){
	$('#showstoreitem').modal();
}
scope.pagedata.check_buy=function(){
	var goodsid=scope.pagedata.post.goodsid
	var num=scope.pagedata.post.num
	var optionsid=scope.pagedata.post.optionsid
	var addressid=scope.pagedata.post.addressid
	var storeid=scope.pagedata.post.storeid
	scope.get('jy_weishop/goods.detail/check_buy/goodsid='+goodsid+'&num='+num+'&optionsid='+optionsid+'&addressid='+addressid+'&storeid='+storeid,function(res){});
}
</script>
<script>
//前端先注册以等待接收消息
require(['jinyun_socket'],function(jinyun_socket){
    jinyun_socket.connect(function(){
            jinyun_socket.join('goodsid'+scope.pagedata.goods.id);//加入ID为1的组
     });	 
    jinyun_socket.onsystem=function(res){
        console.log('收到来自后端的消息：');console.log(res);
		vote_tanmu(res.nickname,res.avatar,res.time);
    }
});
function vote_tanmu(nickname,avatar,time) {
		var x = 100;       
		var y = 330;
		var num = Math.floor(Math.random() * 6 + 1);
		var index=$('.video-sms-list').children('li').length;
		avatar=scope.tomedia(avatar);
		avatar = avatar?avatar:'../core/resource/images/nopic.jpg';
		$htmls = '<li class="video-sms-pane"><div class="video-sms-text"><img class="video-sms-logo" src="'+ avatar+'"/><span class="overflow-h">最新订单来自'+nickname+'，'+time+'秒前</span></div></li>';
		$(".video-sms-list").append($htmls);
		$(".video-sms-list").find("li").animate({
			bottom:"560px",
			opacity:"0",
		},10000)
}
</script>